home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
- <stack>
- <name>in</name>
- <id>-1</id>
- <cardCount>16</cardCount>
- <cardID>3003</cardID>
- <listID>12023</listID>
- <cantModify><false /></cantModify>
- <cantDelete><false /></cantDelete>
- <cantAbort><false /></cantAbort>
- <cardSize>
- <width>512</width>
- <height>342</height>
- </cardSize>
- <script>-- on openStack
- -- push recent card
- -- pass openStack
- -- end openStack
-
-
- -- -- this is the section that should apear in each section's stack!
-
-
- -- Open/init card code:
-
- -- Override to do local initialization (remember to pass if approp.).
- on openCard
- global doingBackFields, nextFieldNum, onLine, crcFlg
- global lookingFor
- put empty into lookingFor
- set cursor to 4
- set lockScreen to true
- send initFields to this card
- set lockScreen to false
- if onLine then
- sendString return & return
- get short name of this card
- if (word 1 of it <> "card") or (word 2 of it <> "id") then
- if it is not empty then sendString it & return
- end if
- repeat with i = 1 to the number of fields
- get the lockText of field i
- if isEditable(name of field i) and (not it) then
- next repeat
- end if
- if not the visible of field i then next repeat
- put short name of field i into n
- if (word 1 of n is not "Bkgnd") or ¬
- (word 2 of n is not "field") or (word 3 of n is not "id") then
- get isLong("field " & i)
- if it then get n & ":" & return
- else get n & ": "
- else get empty
- if sendWithAbort(it & field i) then
- send abortOC
- exit openCard
- end if
- end repeat
- repeat with i = 1 to the number of card fields
- get the lockText of card field i
- if isEditable(name of card field i) and (not it) then next repeat
- if not the visible of card field i then next repeat
- put short name of card field i into n
- if (word 1 of n is not "card") or ¬
- (word 2 of n is not "field") or (word 3 of n is not "id") then
- get isLong("card field " & i)
- if it then get n & ":" & return
- else get n & ": "
- else get empty
- if sendWithAbort(it & card field i) then
- send abortOC
- exit openCard
- end if
- end repeat
- if crcFlg then disCRC
- flushInput
- end if
- put true into doingBackFields
- put 1 into nextFieldNum
- set cursor to 0
- end openCard
-
- -- incase of abort
- on abortOC
- flushInput
- put true into doingBackFields
- put 1 into nextFieldNum
- set cursor to 0
- end abortOC
-
- on initFields
- global initFs
- if initFs then
- repeat with i = 1 to the number of fields
- if isEditable(name of field i) then put empty into field i
- end repeat
- repeat with i = 1 to the number of card fields
- if isEditable(name of card field i) then put empty into card field i
- end repeat
- end if
- end initFields
-
- on displayFields
- end displayFields
-
- on disCRC
- put 0 into theCRC
- repeat with i = 1 to the number of fields
- get the lockText of field i
- if isEditable(name of field i) and (not it) then next repeat
- if not the visible of field i then next repeat
- put stringCRC(theCRC,field i) into theCRC
- end repeat
- repeat with i = 1 to the number of card fields
- get the lockText of card field i
- if isEditable(name of card field i) and (not it) then next repeat
- if not the visible of card field i then next repeat
- put stringCRC(theCRC,card field i) into theCRC
- end repeat
- sendString return & ".C=" & theCRC & return
- end disCRC
-
- -- Send text code:
-
- on sendString string
- global onLine
- if onLine then
- resetTimer
- sendSPort string
- end if
- end sendString
-
- on sendVanilla string
- global onLine
- if onLine then
- resetTimer
- configureSPort linefeedOff
- sendSPort string
- configureSPort linefeedOn
- end if
- end sendVanilla
-
- -- Field type testing code:
-
- function isEditable f
- get the script of f
- if "-" & "- editable" is in it then return true
- else return false
- end isEditable
-
- function isLong f
- get the script of f
- if "-" & "- long" is in it then return true
- else return false
- end isLong
-
- function isInvisible f
- get the script of f
- if "-" & "- invisible" is in it then return true
- else return false
- end isInvisible
-
- on stopNow
- global sysTOVal
- put charsAvailable() into charCnt
- if charCnt is not zero then
- put recvChars(charCnt) into incoming
- if (numToChar(19) is in incoming) then
- flushInput
- put the secs into was
- repeat while charsAvailable() is zero
- if the secs > (was + sysTOVal) then exit repeat
- end repeat
- flushinput
- end if
- end if
- end stopNow
-
- function sendWithAbort theText
- global sendAborted, sysTOVal
- get theText
- repeat with i = 1 to the number of lines in it
- sendString line i of it & return
- put charsAvailable() into charCnt
- if charCnt is not zero then
- put recvChars(charCnt) into incoming
- if (numToChar(3) is in incoming) or ¬
- (numToChar(15) is in incoming) or ¬
- (numToChar(24) is in incoming) then
- put true into sendAborted
- return true
- exit sendWithAbort
- else
- if (numToChar(19) is in incoming) then
- flushInput
- put the secs into was
- repeat while charsAvailable() is zero
- if the secs > (was + sysTOVal) then exit repeat
- end repeat
- flushinput
- end if
- end if
- end if
- end repeat
- return false
- end sendWithAbort
-
- on promptField
- put short name of the target into n
- get word 1 of n
- if (it is "card") or (it is "Bkgnd") then
- get (word 2 of n is not "field") or (word 3 of n is not "id")
- else get true
- if it then
- if isLong(the target) then put ":" & return after n
- else put ": " after n
- sendString n
- end if
- end promptField
-
- on lookingForNothing
- global doingBackFields, nextFieldNum
- if doingBackFields then
- repeat
- if nextFieldNum > the number of fields then exit repeat
- put nextFieldNum into i
- add 1 to nextFieldNum
- get the lockText of field i
- if (not isEditable(name of field i)) or it then next repeat
- if not the visible of field i then next repeat
- put empty into field i
- send promptField to field i
- if isLong(name of field i) then
- sendString "[End with a period (.) on a line by itself]" & return
- fillField name of field i,false,isInvisible(name of field i)
- else fillField name of field i,true,isInvisible(name of field i)
- exit lookingForNothing
- end repeat
- put false into doingBackFields
- put 1 into nextFieldNum
- end if
- repeat
- if nextFieldNum > the number of card fields then exit repeat
- put nextFieldNum into i
- add 1 to nextFieldNum
- get the lockText of card field i
- if (not isEditable(name of card field i)) or it then next repeat
- if not the visible of card field i then next repeat
- put empty into card field i
- send promptField to card field i
- if isLong(name of card field i) then
- sendString "[End with a period (.) on a line by itself]" & return
- fillField name of card field i,false,¬
- isInvisible(name of card field i)
- else fillField name of card field i,true,¬
- isInvisible(name of card field i)
- exit lookingForNothing
- end repeat
- send cardFilled to this card
- end lookingForNothing
-
- -- Button related code:
- on displayButtons
- global onLine, errorCount
- if onLine then
- flushInput
- put empty into text
- get ">> "
- repeat with i = 1 to the number of background buttons
- if not the visible of background button i then next repeat
- put it & short name of background button i after text
- get ", "
- end repeat
- repeat with i = 1 to the number of buttons
- if not the visible of button i then next repeat
- put it & short name of button i after text
- get ", "
- end repeat
- if it is ", " then
- sendString text & ": "
- put 0 into errorCount
- lookFor "singleChar","pushButton"
- else send noButtons to this card
- end if
- end displayButtons
-
- on cardFilled
- send displayButtons to this card
- end cardFilled
-
- -- -- -- end of stuff to put in every stack
-
- </script>
- <background id="2642" file="background_2642.xml" name="" />
- <card id="3003" file="card_3003.xml" marked="false" name="" owner="2642" />
- <card id="3724" file="card_3724.xml" marked="false" name="" owner="2642" />
- <card id="4069" file="card_4069.xml" marked="false" name="" owner="2642" />
- <card id="4254" file="card_4254.xml" marked="false" name="" owner="2642" />
- <card id="4434" file="card_4434.xml" marked="false" name="" owner="2642" />
- <card id="3322" file="card_3322.xml" marked="false" name="" owner="2642" />
- <card id="4764" file="card_4764.xml" marked="false" name="" owner="2642" />
- <card id="5021" file="card_5021.xml" marked="false" name="" owner="2642" />
- <card id="5479" file="card_5479.xml" marked="false" name="" owner="2642" />
- <card id="5757" file="card_5757.xml" marked="false" name="" owner="2642" />
- <card id="2412" file="card_2412.xml" marked="false" name="" owner="2642" />
- <card id="6812" file="card_6812.xml" marked="false" name="" owner="2642" />
- <card id="5929" file="card_5929.xml" marked="false" name="" owner="2642" />
- <card id="6195" file="card_6195.xml" marked="false" name="" owner="2642" />
- <card id="6466" file="card_6466.xml" marked="false" name="" owner="2642" />
- <card id="3437" file="card_3437.xml" marked="false" name="" owner="2642" />
- </stack>
-